package model;

import java.sql.*;

public interface IModel {
	IModel readFromResultSet(ResultSet rs) throws SQLException;

	PreparedStatement genSelectStatement(Connection dbConn, IModel query)
			throws SQLException;

	PreparedStatement genSelectListStatement(Connection dbConn, IModelExt input)
			throws SQLException;

	PreparedStatement genUpdateStatement(Connection dbConn, IModel model)
			throws SQLException;

	PreparedStatement genDeleteStatement(Connection dbConn, IModel query)
			throws SQLException;

	PreparedStatement genCountStatement(Connection dbConn, IModelExt input)
			throws SQLException;

	PreparedStatement genInsertStatement(Connection dbConn, IModel model)
			throws SQLException;

	int[] getPrimaryKey();

//	boolean checkSelectRight(IModel obj);
//
//	boolean checkDeleteRight(IModel obj);
//
//	boolean checkUpdateRight(IModel obj);
//
//	boolean checkInsertRight(IModel obj);	
//
//	boolean checkSelectListRight(IModelExt query);
//
//	boolean checkCountRight(IModelExt query);
}